<!DOCTYPE html>
<html>
<head>
    <title></title>
    <meta charset="UTF-8">
    <link rel="stylesheet" type="text/css" href="css/bootstrap.css" />
    <link rel="stylesheet" type="text/css" href="css/bootstrap-responsive.css" />
    <link rel="stylesheet" type="text/css" href="css/style.css" />
    <script type="text/javascript" src="js/jquery.js"></script>
    <script type="text/javascript" src="js/jquery.sorted.js"></script>
    <script type="text/javascript" src="js/bootstrap.js"></script>
    <script type="text/javascript" src="js/ckform.js"></script>
    <script type="text/javascript" src="js/common.js"></script>
    <script type="text/javascript" src="js/showdate.js"></script>
	<script type="text/javascript" src="../js/contextPath.js"></script>
    <style type="text/css">
        body {font-size: 20px;
             padding-bottom: 40px;
             background-color:#e9e7ef;
             font-size:17px;
        }
        .sidebar-nav {
            padding: 9px 0;
        }

        @media (max-width: 980px) {
            /* Enable use of floated navbar text */
            .navbar-text.pull-right {
                float: none;
                padding-left: 5px;
                padding-right: 5px;
            }
        }
    </style>
</head>
<h3><strong>基本信息：</strong></h3>    
    <table id="student" class="table table-condensed">
               <tr>
	              <td width="18%" height="30" align="center">姓 名：</td>
				   <td width="82%" class="word_grey"></td>
	            </tr>
				<tr>
	              <td width="18%" height="30" align="center">手机号：</td>
	              <td width="82%" class="word_grey"></td>
	            </tr>
	            <tr>
	              <td height="28" align="center">密&nbsp;&nbsp;&nbsp;&nbsp;码：</td>
	              <td height="28"></td>
	            </tr>
				<tr>
	              <td height="28" align="center">性别：</td>
	              <td height="28"></td>
	            </tr> 
	            <tr>
	              <td height="28" align="center">身份证号：</td>
	              <td height="28"></td>
	            </tr> 
	            <tr>
	              <td height="28" align="center">学习者想要学习的大类：</td>
	              <td height="28"></td>
	            </tr>
		<tbody id="tbody-result">
		</tbody>
	</table>
</body>
</html>
<script>
    var url = location.search; //获取url中"?"符后的字串
    var theRequest = new Object();
    if (url.indexOf("?") != -1) {
        var str = url.substr(1);
        strs = str.split("&");
        for(var i = 0; i < strs.length; i ++) {
            theRequest[strs[i].split("=")[0]]=decodeURI(strs[i].split("=")[1]);
        }
    }
    $.ajax({
         type:'GET',
         url:contextPath+"learner/info/"+theRequest.name,
         success:function (data) {
             console.log(data);
             var table = document.getElementById("student");
             table.rows[0].cells[1].innerHTML=data.name;
             table.rows[1].cells[1].innerHTML=data.phone;
             table.rows[2].cells[1].innerHTML="******";
             table.rows[3].cells[1].innerHTML=data.sex;
             table.rows[4].cells[1].innerHTML=data.userid;
             table.rows[5].cells[1].innerHTML=data.coursedir;
         },
         error:function () {
             alert("查看失败");
         }
     })
</script>


